package cn.liziy.dao.impl;

import cn.liziy.dao.UserDao;
import cn.liziy.entity.User;
import liziy.spring.beans.factory.annotation.Scope;
import liziy.spring.beans.factory.config.BeanDefinition;
import liziy.spring.core.stereotype.Repository;

/**
 * @author Liziy
 * @date 2020/12/15 22:50
 **/
@Repository("dao") //标注持久层
@Scope(BeanDefinition.SCOPE_SINGLETON)
public class UserDaoImpl implements UserDao {
    @Override
    public User queryById(int id) {
        User user = new User();
        user.setId(1001);
        user.setName("admin");
        user.setPassword("123");
        return user;
    }
}
